import request from '@/utils/request'
import cache from "@/plugins/cache";

// 查询变量寄存器配置列表
export function listQsTag(query) {
  return request({
    url: '/system/qstaginit/list',
    method: 'get',
    params: query
  })
}

// 查询变量寄存器配置详细
export function getQsTag(tagid) {
  return request({
    url: '/system/qstaginit/' + tagid,
    method: 'get'
  })
}

// 新增变量寄存器配置
export function addQsTag(data) {
  return request({
    url: '/system/qstaginit',
    method: 'post',
    data: data
  })
}

// 修改变量寄存器配置
export function updateQsTag(data) {
  return request({
    url: '/system/qstaginit',
    method: 'put',
    data: data
  })
}

// 删除变量寄存器配置
export function delQsTag(tagid) {
  return request({
    url: '/system/qstaginit/' + tagid,
    method: 'delete'
  })
}

//报警等级
export function alarmLevelSelect() {
  return request({
    url: '/system/qstaginit/listAllAlarmType',
    method: 'get'
  })
}

export function getDbName() {
  return cache.local.get("currentProject");
}

